<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    //使用var定义的全局变量是删不掉的
   /* var a = "a";
    delete window.a
    console.log(window.a)*/


    //大多数原型上的属性 方法是不可枚举的
    Object.deepFreeze = function(obj) {
        var props = Object.getOwnPropertyNames(obj);
        props.forEach(function(prop){
            var val = obj[prop]
            if(typeof val === "object" && val!==null){
                deepFreeze(val)
            }
        })

        Object.freeze(obj)
    };


    var obj = {}
    for(var key in obj){
        console.log(key);
    }

    // console.log(Object.getOwnPropertyDescriptor(Object.prototype,"toString"))
</script>
</html>